﻿@{
    int page = ViewBag.PageIndex;
    string kw = ViewBag.Keyword;
    int i = 0;
}
@using StockMatch.Service.Entity;
@model Users
<div class="content-box">
    <div class="content-box-header">
        <h3 style="cursor: s-resize;">用户管理</h3>
        <ul class="content-box-tabs">
            <li><a href="javascript:;" class="default-tab current" id="List">列表</a></li>
        </ul>
        <div class="clear"></div>
    </div>
    <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
            <div class="">
                <form action="@Url.DomainRouteUrl(AreasConfig.Admin,"Index","User")">
                    <input type="text" name="kw" value="@(kw)" class="text-input" placeholder="按用户名，姓名搜索" />
                    <button type="submit" value="">搜索</button>
                </form>
            </div>
            <table>
                <thead>
                    <tr>
                        <th>
                            <input class="check-all" type="checkbox">
                        </th>
                        <th>用户名</th>
                        <th>真实姓名</th>
                        <th>身份证</th>
                        <th>手机号</th>
                        <th>邮箱</th>
                        <th>提款密码</th>
                        <th>总资产</th>
                        <th>配资金额</th>
                        <th>风险保证金</th>
                        <th>冻结金额</th>
                        <th>余额</th>
                        <th>省份</th>
                        <th>安全等级</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model.Items)
                    {
                        i++;
                        <tr class="@(i % 2 == 0 ? "" : "alt-row")">
                            <td>
                                <input type="checkbox">
                            </td>
                            <td>@Html.ActionLink((!string.IsNullOrEmpty(item.UserName) ? item.UserName : "--"), "Detail", new { id = item.UserId })</td>
                            <td>@item.UserTrueName</td>
                            <td>@item.UserCard</td>
                            <td>@item.Phone</td>
                            <td>@item.Email</td>
                            <td>@item.DrawingPassword</td>
                            <td>@item.TotalAmount</td>
                            <td>@item.StockAmount</td>
                            <td>@item.RiskAmount</td>
                            <td>@item.LockAmount</td>
                            <td>@item.BalanceAmount</td>
                            <td>@(item.Province+" "+item.City)</td>
                            <td>@item.SafeGrade</td>
                            <td><a>@item.UserState</a> </td>
                            <td>
                                @Html.ActionLink("删除", "Delete", new { id = item.UserId, page = page, kw = kw}, new { onclick = "return confirm('确定要删除吗？');" })
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
